//
//  CityDetailVC.swift
//  GoTravel
//
//  Created by lanou3g on 16/3/12.
//  Copyright © 2016年 SHH. All rights reserved.
//

import UIKit

class CityDetailVC: WMPageController {

    var headerName:String?
    
    func initWithPlaceID(placeID:String) {
        self.titles = ["景点","餐馆","酒店","购物","活动"]
        self.viewControllerClasses = [CityFieldTableViewController.classForCoder(),
            CityFieldTableViewController.classForCoder(),
            CityFieldTableViewController.classForCoder(),
            CityFieldTableViewController.classForCoder(),
            CityFieldTableViewController.classForCoder()
        ]
        
        self.keys = ["urlArray","urlArray","urlArray","urlArray","urlArray"]
        self.values = [[0,placeID],[1,placeID],[2,placeID],[3,placeID],[4,placeID]]
        self.titleColorSelected = UIColor.grayColor()
        self.menuViewStyle = .Line
        self.reloadData()
    }
    
    override func viewDidLoad() {
        super.viewDidLoad()

        self.navigationItem.title = self.headerName
        self.navigationItem.leftBarButtonItem = UIBarButtonItem(image: UIImage(named: "HTiconfont-fanhui"), style: UIBarButtonItemStyle.Plain, target: self, action: Selector("leftButtonAction"))
    }
    
    //左按钮的事件
    func leftButtonAction() {
        self.navigationController?.popToRootViewControllerAnimated(true)
    }
    

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    

    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
        // Get the new view controller using segue.destinationViewController.
        // Pass the selected object to the new view controller.
    }
    */

}
